/*
 * @Author       : Hejh(3010733382@qq.com)
 * @Version      : V1.0
 * @Date         : 2024-01-29 12:46:41
 * @Description  : 存储源相关类型
 */

import type { PageRes } from './commom'

export interface StorageOriginReq {
  page?: number
  pageSize?: number
}

// StorageOrigin返回实体
export interface StorageOriginRes {
  id: string
  name: string
  type: string
  sizeMax: string
  path: string
  isDefault: number
  accessKey?: string
  accessSecret?: string
  endPoint?: string
  bucketName?: string
}

// 分页StorageOrigin返回实体
export type StorageOriginPageRes = PageRes<StorageOriginRes>

// 存储源添加请求实体类型
export interface StorageOriginCreateReq {
  name: string
  type: string
  sizeMax: string
  path: string
  isDefault: number
  accessKey?: string
  accessSecret?: string
  endPoint?: string
  bucketName?: string
}

// 存储源修改请求实体
export interface StorageOriginUpdateReq extends StorageOriginCreateReq {
  storageOriginId?: string
}
